<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateCombosTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('combos', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('title')->nullable()->comment('套餐名称');
			$table->string('thumb')->nullable()->comment('套餐封面');
			$table->decimal('price', 9)->default(0.00)->comment('价格');
			$table->integer('times')->default(0)->comment('包含次数');
			$table->string('desc')->nullable()->comment('描述');
			$table->text('content', 65535)->nullable()->comment('详情');
			$table->boolean('rate_type')->nullable()->comment('1.按系统设置2.自定义');
			$table->float('rate', 10, 0)->default(0)->comment('返利比率');
			$table->float('top_rate', 10, 0)->nullable();
			$table->integer('sort')->nullable();
			$table->boolean('status')->nullable()->comment('是否上架1是2否');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('combos');
	}

}
